<?php
class Buyshop extends CActiveRecord
{
	public static function model($classname=__CLASS__)
	{
		return parent::model($classname);
	}
	public function tableName()
	{
		return 'buyshop';
	}
	public function relations()
	{
		return array(
				'user'=>array(self::BELONGS_TO,'User','userid'),
				'shop'=>array(self::BELONGS_TO,'Shop','shopid'));
	}
	public function rules()
	{
		return array(
				array('userid','required'),
				array('shopid','required'),
				);
	}
}